package com.nondo.dean.pay.mapper;

import com.nondo.dean.pay.domain.MchInfo;
import com.nondo.dean.pay.domain.MchInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MchInfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchInfoSqlProvider.class, method="countByExample")
    long countByExample(MchInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @DeleteProvider(type=MchInfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(MchInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Delete({
        "delete from pay_mch_info",
        "where mch_id = #{mchId,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String mchId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Insert({
        "insert into pay_mch_info (mch_id, name, ",
        "type, req_key, res_key, ",
        "state, create_time, ",
        "update_time)",
        "values (#{mchId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, ",
        "#{type,jdbcType=VARCHAR}, #{reqKey,jdbcType=VARCHAR}, #{resKey,jdbcType=VARCHAR}, ",
        "#{state,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(MchInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @InsertProvider(type=MchInfoSqlProvider.class, method="insertSelective")
    int insertSelective(MchInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="req_key", property="reqKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="res_key", property="resKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MchInfo> selectByExampleWithRowbounds(MchInfoExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @SelectProvider(type=MchInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="req_key", property="reqKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="res_key", property="resKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<MchInfo> selectByExample(MchInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Select({
        "select",
        "mch_id, name, type, req_key, res_key, state, create_time, update_time",
        "from pay_mch_info",
        "where mch_id = #{mchId,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="mch_id", property="mchId", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="type", property="type", jdbcType=JdbcType.VARCHAR),
        @Result(column="req_key", property="reqKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="res_key", property="resKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    MchInfo selectByPrimaryKey(String mchId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MchInfo record, @Param("example") MchInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MchInfo record, @Param("example") MchInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @UpdateProvider(type=MchInfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MchInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pay_mch_info
     *
     * @mbg.generated Wed Jan 31 17:46:05 CST 2018
     */
    @Update({
        "update pay_mch_info",
        "set name = #{name,jdbcType=VARCHAR},",
          "type = #{type,jdbcType=VARCHAR},",
          "req_key = #{reqKey,jdbcType=VARCHAR},",
          "res_key = #{resKey,jdbcType=VARCHAR},",
          "state = #{state,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP}",
        "where mch_id = #{mchId,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MchInfo record);
}